package com.lm.ledger.exception;

public class LedgerException extends Exception{
    String message;

    /**
     * Constructor which forward the the generic exception to the super class call stack.
     */
    @SuppressWarnings("unused")
    public LedgerException(){
        super();
        message = "Unknown";
    }

    /**
     * Constructor which forward the exception to the super class call stack.
     *
     * @param exception The occurred exception at the DAO layer.
     */
    @SuppressWarnings("unused")
    public LedgerException(Exception exception){
        super(exception);
        message = "Unknown";
    }

    /**
     * Constructor which calls to the super class sets the required message for the message property.
     *
     * @param message The the custom message from the DAO layer.
     */
    public LedgerException(String message){
        super();
        this.message = message;
    }

    /**
     * Constructor which forward the exception to the super class call stack and sets the required parameter
     * for the LedgerException.
     *
     * @param exception The occurred exception at the DAO layer.
     */
    public LedgerException(String message, Exception exception){
        super(exception);
        this.message = message;
    }

    /**
     * Return a meaningful String for the TicketingSystem.
     */
    public String toString() {
        return message;
    }



}
